<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title></title>
    </head>
    <body>

        </br>
        </br>
        </br>
        </br>
        </br>
        <font size="5" color="red" face="Calibri" ><?php echo $_POST["customername"] ?> , </font>
        </br>
        </br>
        <font size="5" color="red" face="Calibri" >Thanks for Visiting. </font>
        </br>
        <font size="5" color="red" face="Calibri" >Hope you enjoyed our service </font>
        </br>
        </br>
        <font size="5" color="green" face="Calibri" >Have a nice day ! </font>
        </br>
         </br>
        <font size="5" color="blue" face="Calibri" >Your data has been saved in our records. The shipment may take 2-3 weeks</font>
        </br>
        <font size="5" color="blue" face="Calibri" >Here are the Direct Download links for your products</font>
        </br>
        </br>

        <?php

        $k=0;
        $order="";
        foreach ($_SESSION["cart"] as $name)
             {
                 $order=$order.$_SESSION["quantity"][$k]."||".$name."---";
                 $k+=1;
             }
        ///echo $order;/////////

        $con=mysql_connect("localhost","root");
            if(!$con)
            {echo "COULD NOT CONNECT";
             mysql_close($con);
            }
            mysql_select_db("shoppingcart",$con);
            $sql = 'INSERT INTO `shoppingcart`.`orders` (`name`, `address`, `order`, `cardno`, `rating`) VALUES (\''.$_POST["customername"]. '\', \''.$_POST["address"].'\', \''.$order.'\', \''.$_POST["cardnumber"].'\', \''.$_POST["rating"].'\');';
            //$sql = "INSERT INTO shoppingcart orders (name, address, order, cardno, rating) values(\"".$_POST["customername"]."\", \"".$_POST["address"]."\", \"".$order."\", ".$_POST["cardnumber"].", ".$_POST["rating"].");";
            //$query="  INSERT INTO orders values (\"   ".$_POST["customername"]."  \",\"  ".$_POST["address"]."  \",\"  ".$order."  \",  ".$_POST["cardnumber"]."  ,  ".$_POST["rating"]."  )  ";
            //echo $sql;
            mysql_query($sql);
            //echo $_POST["name"];
            //echo $_POST["address"];
            //echo $_POST["cardnumber"];
            //echo $_POST["rating"];
          mysql_close($con);


          foreach ($_SESSION["fullpath"] as $name)
                    {
                        echo "  <a href=\"ftp://localhost/ShoppingCart/".$name."\">".$name."</a>";
                        echo "</br>";
                    }


         ?>
        

    </body>
</html>
